Repository navigation
Fix 21 files that stopped compiling after the 6823e33eab, efea7fccd7 and 1feb9c9821 header syncs - #546
Merged
Conversation
The Ghidra sync efea7fc renamed PlayerData::aiControlStatusRelated to aiHoldBackTicks (the same int at 0x2274). migrateGameStateForMapVersion, setAIControlStatusTo100000 and six Update* unit functions still used the old name; they move to main's name. No header or status line changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The syncs 6823e33 and 1feb9c9 renamed or merged four more things that eight files still used: - Entity's short at 0xB0: unkMinusOne -> blendStrength (setEntityParameters, tickEntityDecayCounter). - The global at 0x00ED3154: DAT_00ed3154 (undefined4) -> INT_00ed3154 (int), with its header (ApplyBlending, BlitMapImageWithVerticalClip, RenderTerrainTilesCenterPiece). - MenuTextInputState's method at 0x004917C0: meth_0x4917c0 -> closeAllModalDialogs (MenuItemActionHandler_General_LaunchOrQuitMultiplayerGameUnk). - The three SkMasters2 globals (version, count, entries) are now one struct, DAT_SkMasters2Data at 0x00DF6248 (ReadSkMasters2, WriteSkMasters2). No header or status line changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The syncs typed three things these files pass or compare as plain numbers, and merged the SkMasters2 globals: - SetStorageMarketFailState takes a StorageMarketFailStateEnum: the SMFS_ names for the numbers it is given and the states compared after it (MenuItemActionHandler_AlliesSendAndRequestGoods_Main, MenuItemActionHandler_BuildingAndStatusMenu_BuySellMenuButtonsAndHands), as in gynt's sourcehold#295. - The plateau call's fourth parameter is a Logic2: a cast on DAT_GameCommandParam3 (ClickCreatePlateau), as in gynt's sourcehold#396. - DAT_SkMasters2DataArray is DAT_SkMasters2Data's entries (Skirmish_SortAIOpponentOrder, MenuItemActionHandler_RankingGames_Main), as in gynt's sourcehold#525 and sourcehold#529. The hunks are gynt's, unchanged, so those PRs merge with this one. Co-authored-by: Gynt <gynt@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Match regression check 1 of the 20 status entries behind the files this PR changes are below the best match already known on
Percentages are read from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main (624acf6) has 21
.cppfiles that no longer compile since the Ghidra syncs of 2026-12-02. The syncs renamed four fields, globals and methods, merged the three SkMasters2 globals into one struct and gave three parameters a type, and these files still use the old names or pass plain numbers. This PR moves them to main's names and types and changes nothing else: no header and no status line. Each function compiles to the same code as before the syncs; the one exception moves toward the original (see Measured).migrateGameStateForMapVersion,setAIControlStatusTo100000,UpdateArabianArcher,UpdateArabianSwordsman,UpdateCrusaderArcher,UpdateKnight,UpdatePikeman,UpdateSwordsmanPlayerData::aiControlStatusRelatedaiHoldBackTicks(the sameintat 0x2274)setEntityParameters,tickEntityDecayCounterEntity::unkMinusOneblendStrength(the sameshortat 0xB0)ApplyBlending,BlitMapImageWithVerticalClip,RenderTerrainTilesCenterPieceDAT_00ed3154(undefined4)INT_00ed3154(int), with its headerMenuItemActionHandler_General_LaunchOrQuitMultiplayerGameUnkMenuTextInputState::meth_0x4917c0closeAllModalDialogsReadSkMasters2,WriteSkMasters2,Skirmish_SortAIOpponentOrder,MenuItemActionHandler_RankingGames_MainDAT_SkMasters2Data_Version,_Count,DAT_SkMasters2DataArrayDAT_SkMasters2Data::instance.version,.count,.entriesMenuItemActionHandler_AlliesSendAndRequestGoods_Main,MenuItemActionHandler_BuildingAndStatusMenu_BuySellMenuButtonsAndHandsSetStorageMarketFailState(3, …),storageMarketFailState == 6SMFS_namesClickCreatePlateauDAT_GameCommandParam3(undefined4) as the call's fourth argumentLogic2Three commits: the eight files of efea7fc's rename; the eight other renames; the five files whose fix is already in your open PRs, with your lines unchanged and you as co-author. The include lines follow the names, sorted by clang-format. The style bot's comment will list main's own lines in these files (hex masks,
+= 1); this PR changes only the names and the five typed arguments.Your open PRs
Fifteen of the files have the same lines in your open PRs: #501 (
migrateGameStateForMapVersion,setAIControlStatusTo100000,UpdateArabianSwordsman,UpdateKnight,UpdateSwordsman), #291 (blendStrength), #295 (closeAllModalDialogsand the twoSMFS_handlers), #396 (ClickCreatePlateau), #525 and #529 (the SkMasters2 files). Each of those PRs merges with this branch the same way it merges with main (git merge-tree: #291, #295, #396 and #525 clean; #501 and #529 only thecmake/compiler-flags-gl.txtconflict they already have with main). The other six files are in no open PR: the three units from #512 and #518 and the three render functions.Still not compiling
prepareProjectileTarget: main's header has itvoidsince d134c77; our open Reimplement UnitsState::prepareProjectileTarget at 100%, from gynt's text on main (one header line each in two files) #540 changes the.cpp.findBestAttackTileByPathCost(itsdwordreturn against the header'sintsince dbfa93e; Reimplement 66 TroopValueState functions at 100% #501 changes it) andresetTileAndClearMoat(TT_UNKNOWN_5to_7, named since 7eeee88; Reimplement 67 Map::TileMapState functions (batch 2) #396 changes it).TransformAndRenderPercentagecompiles again since #509.Measured
Setup: the bundled MSVC1400-SP1 against the Steam
Stronghold Crusader.exe(3bb0a8c1…5387ac5a), sourcehold's reccmp with--resolve-wrapped-calls --ignore-security-cookie, both resolver sets enabled locally (not committed).quick_diff.py), against main before the syncs (a0dc309): the same code in 20 of the 21, but for the compiler's numbered temporaries in the SkMasters2 pair. InmigrateGameStateForMapVersiontwo loads trade places (mov si/mov dxin front of the0x51eb851fdivide) and now stand in the original's order. That comes with the syncs' other header changes: main just before efea7fc (6823e33) gives the old order too, and the edit here is a name only.TransformAndRenderPercentage(on our list from before Reimplement 59 TextManager and UserTextHandler functions at 100% #509): 3,102 files, it links, 3,120 functions compared. The 21 read as in our last full build before the syncs (the morning of 2026-12-02), but formigrateGameStateForMapVersion, which goes from 99.8 / 95.5 to 100.0 / 100.0. Seventeen are at 100.0;WriteSkMasters298.8,ReadSkMasters297.1,Skirmish_SortAIOpponentOrder95.0 andBuySellMenuButtonsAndHands93.9 are unchanged..cppunchanged since:UpdateUnitLossSpeechFeedback(99.6 to 95.6),MenuItemRenderFunction_GameplayOptions_SpeedSlider(100.0 to 94.1),tracePathPlanToDestinationViaUnoccupiedTiles(100.0 to 99.5),MenuModalRenderFunction_TutorialBox(100.0 to 99.6) andMenuItemActionHandler_LobbyMenu_LobbyscreenStartButtonClick(99.6 to 99.3). We haven't looked into what moved them.Other PRs
Our open #536, #540 and #544 share no file with this one and merge with it cleanly.
🤖 Generated with Claude Code